package com.hcg.multidatasourceofanno2.service.hcservice.impl;

import com.hcg.multidatasourceofanno2.domain.User;
import com.hcg.multidatasourceofanno2.mapper.hcmapper.HcUserMapper;
import com.hcg.multidatasourceofanno2.service.hcservice.HcUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("hcUserService")
public class HcUserServiceImpl implements HcUserService {

    @Autowired
    private HcUserMapper hcUserMapper;

    @Override
//    @Transactional(transactionManager = "hcgTransactionManager")
    @Transactional
    public void saveUser(User user) {
//        hcUserMapper.addUser(user.getUid(),user.getNickname(),user.getName(),user.getPassword(),user.getSalt(), user.getMobile());
        hcUserMapper.insert(user);
        int i = 1/0;
    }

}
